import { EssayService } from '@/service/admin/EssayService'
import { EssayDao } from '@/dao/admin/EssayDao'
import { Service, Inject } from 'typedi';
import { res } from '@/utils/jsonResult';
import { CommentParams } from '@/model/request/Comment';
import { Token } from '@/m_req/Token'
import { Article } from '@/entity/Article';
import { Essayreq ,Essayupdata} from '@/model/request/Essayreq';
//后端文章
@Service()
export class EssayServiceImpl implements EssayService {
   
    @Inject()
    EssayDao!: EssayDao

    //后端文章添加
     async Essayadd(Promise: Essayreq,token:Token): Promise<res<null>> {
        return this.EssayDao.Essayadd(Promise,token)
    }

    

    //后端文章删除
    async Essaydelete(Promise:Article): Promise<res<null>> {
        return this.EssayDao.Essaydelete(Promise)
    }
    
   

    //后端文章修改
    async Essayupdata(Promise: Essayupdata): Promise<res<null>> {
        return this.EssayDao.Essayupdata(Promise)
    }
}